package com.dd.cloud.user.entity.educationvisit;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author xt
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "患教随访管理表")
public class PatientEducationVisit implements Serializable {


    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 文章标题
     */
    @Column(comment = "文章标题", length = 50)
    private String title;

    /**
     * 科室
     */
    @Column(comment = "科室", length = 32)
    private String department;

    /**
     * 备注
     */
    @Column(comment = "备注", length = 512)
    private String remark;

    /**
     * 内容
     */
    @Column(comment = "患教内容/随访问卷(问卷前端操作存json)", type = MySqlTypeConstant.TEXT)
    private String content;

    /**
     * 状态 -1.删除 1.正常 2.草稿
     */
    @Column(comment = "状态 -1.删除 1.正常 2.草稿 3.禁用", length = 4)
    private Integer status;

    /**
     * 链接
     */
    @Column(comment = "链接")
    private String url;

    /**
     * 发送次数
     */
    @Column(comment = "发送次数")
    private Integer sendNum;

    /**
     * 填写次数
     */
    @Column(comment = "填写次数(随访)", defaultValue = "0")
    private Integer writeNum;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间")
    private LocalDateTime createDate;

    /**
     * 修改时间
     */
    @Column(comment = "修改时间")
    private LocalDateTime updateDate;

    /**
     * 编辑人
     */
    @Column(comment = "编辑人")
    private String operName;

    /**
     * 类型
     */
    @Column(comment = "类型 1.患教 2.随访")
    private Integer type;

    /**
     * 标签id
     */
    @Column(comment = "标签id")
    private Integer tagId;

    /**
     * 文章类型
     */
    @TableField(exist = false)
    private String tagName;

    /**
     * 阅读数
     */
    @TableField(exist = false)
    private Integer readNum;

    /**
     * 失败原因
     */
    @TableField(exist = false)
    private String reason;

    /**
     * 推送状态 1.推送成功 2.推送失败
     */
    @TableField(exist = false)
    private Integer tsStatus;
}
